<html>
<head>
<link type="text/css" rel="styleSheet" href="css/default.css" />
<link type="text/css" rel="styleSheet" href="css/css.css" />
<script src="js/vue.min.js"></script>
<script src="js/vue-cookies.js"></script>
<script src="js/jquery-3.5.1.js"></script>
</head>
<body>
	<div id="app">
		<div v-for="comment in comments" class="comment"
			style="background-color: white; margin-bottom: 1">
			<div style="height: 30px;">
				<img src="pic/a.jpg" style="width: 26px;" />{{comment.authorname}}
			</div>
			<div id="content" style="overflow: hidden;">{{comment.content}}</div>
			<div style="margin-top: 12px; color: grey">
				<span  btncolor="blue" btnsize="s">赞同{{comment.like}}</span>
				<span  btncolor="blue" btnsize="s">反对{{comment.nolike}}</span>
				<span  btncolor="blue" btnsize="s">回复</span> 
				<span  btncolor="blue" btnsize="s">删除</span> 
				<span  style="float: right">{{comment.time}}</span>
			</div>
		</div>
	</div>
	</div>
</body>
<script>
var userid = window.$cookies.get("userid");
	$.ajax({
		url : "http://localhost/getmycomments/" + userid,
		type : "get",
		success : function(response) {
			console.log(response);
			vm.comments = response;
		}
	});
	var vm = new Vue({
		el : "#app",
		data : {
			comments : "123",
		}
	});
</script>
</html>